#ifndef _OPTION_TYPE_ENUM_FILE_H_
#define _OPTION_TYPE_ENUM_FILE_H_

#include <string>
#include <vector>
#include <sstream>
#include <set>
#include <iterator>

#include "OptionType.h"


namespace inilib
{

	/**
	 * Simple enumerator that takes normal settings (name, isMandatory, amount) and list of possible
	 * string values. It can be used even in cases where there are many (thousands or even milions) possible values.
	 */
	class OptionTypeEnum : public OptionType
	{
	public:
		explicit OptionTypeEnum (
			const std::string & optionName,
			const std::vector< std::string > & possibleValues,
			Mandatory isMandatory = NONMANDATORY,
			ValuesAmount amount = SINGLE_VALUE,
			const std::string & defaultValue = "",
			char separator = ','
		);

		virtual std::vector< std::string > GetDefaultValue () const;

	protected:
		virtual bool AreValuesValid_ ( const std::vector< std::string > & values ) const;

		std::set< std::string > m_PossibleValues;
		std::vector< std::string > m_DefaultValue;
	};

}

#endif